
<%@page import="java.sql.CallableStatement"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.sql.PreparedStatement"%>
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.Connection"%>
<html>
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="Site de LPBD">
        <meta name="author" content="Daniel Lucas">
        <link href="resources/css/bootstrap.css" rel="stylesheet">
        <link href="resources/css/bootstrap-responsive.css" rel="stylesheet">
        <link href="resources/css/datepicker.css" rel="stylesheet">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Finalizar Compra</title>
    </head>
    <body>
        <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container-fluid">
                    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </a>
                    <a class="brand" href="#"> VoeFácil 1.0</a>

                    <div class="nav-collapse">
                        <ul class="nav">
                            <li><a href="index.jsp">Home</a></li>
                            <li><a href="empresa.jsp">Quem Somos</a></li>
                            <li><a href="cancela.jsp">Cancelar Passagem</a></li>
                            <li><a href="contato.jsp">Contato</a></li>
                            <li><a href="Criadores.jsp">Desenvolvedores</a></li>
                        </ul>
                    </div><!--/.nav-collapse -->
                </div>
            </div>
        </div>
        <div class="container-fluid">
            <div class="row">
                <div class="span3">
                    <div class="well sidebar-nav">
                        <ul class="nav nav-list">
                            <li class="nav-header">Menu</li>
                            <li class="nav-header">Menu</li>
                            <li><a href="index.jsp">Home</a></li>
                            <li><a href="empresa.jsp">Quem Somos</a></li>
                            <li><a href="cancela.jsp">Cancelar Passagem</a></li>
                            <li><a href="contato.jsp">Contato</a></li>
                        </ul>
                    </div><!--/.well -->
                </div><!--/span-->
                <%
                            if (request.getParameter("cpf") != null || request.getParameter("id") != null) {
                %>
                <fieldset class="well" style="width: 820px; background-color: azure" >
                    <legend>Passagens</legend>
                    <div class="row" style="padding-left: 50px; padding-top: 7px" >
                        <div class="span8" align="center">
                            <fieldset class="well" style="width: 450px; background-color: lightcyan" >
                                <legend>Lamentamos o Cancelamento de Sua Viagem!</legend>
                                <div class="control-group">
                                    <label class="control-label" for="input01">Dentro de alguns minutos você receberá um e-mail confirmando o cancelamento da compra de sua passagem.
                                        Conte com a gente!
                                        <br><br><br>
                                        <p>&copy; VoeFacil   &nbsp; &nbsp; - &nbsp; &nbsp; Skyway To Heaven</p></label>
                                </div>
                            </fieldset>
                        </div>
                    </div>
                    <!-- -->
                    <center>
                        <div class="control-group">
                            <label class="control-label" for="input01"></label>
                            <div class="controls">
                                <a class="btn btn-success right" href="index.jsp">Home</a>
                            </div>
                        </div>
                    </center>
                </fieldset>
            </div>
        </div>
        <%
                                Class.forName("oracle.jdbc.driver.OracleDriver");
                                Connection cn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE", "system", "123");
                                CallableStatement cal = cn.prepareCall("{call prc_cancela(?, ?)}");
                                cal.setString(1, request.getParameter("cpf"));
                                cal.setInt(2, Integer.parseInt(request.getParameter("id")));
                                cal.executeUpdate();
                            } else {
        %>


        <%                    }
        %>
        <hr>
    <footer>
        <div class="container">
            <p>&copy; VoeFacil</p>
        </div>
    </footer>
</body>
</html>